package com.ithuameng.admin.app.system.model;

import com.baomidou.mybatisplus.annotation.*;
import com.ithuameng.admin.enums.JobStatus;
import com.ithuameng.admin.enums.YesNo;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * Job
 */
@Data
@TableName("t_sys_job")
@EqualsAndHashCode(callSuper = false)
public class SysJob extends AdminLogic<String> {

    private static final long serialVersionUID = -6443432102698017771L;

    public static final String JOB_NAME = "job_name";

    public static final String WITH_PARAM = "with_param";

    public static final String MODULE = "module";

    public static final String JOB_CLASS_NAME = "job_class_name";

    public static final String STATUS = "status";

    /**
     * JobId
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 任务名称
     */
    private String jobName;

    /**
     * 任务类名称
     */
    private String jobClassName;

    /**
     * Cron 表达式
     */
    private String cronExpression;

    /**
     * 是否有参数
     */
    private YesNo withParam;

    /**
     * 参数
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String parameter;

    /**
     * 描述
     */
    private String description;

    /**
     * 任务状态
     */
    private JobStatus status;
}
